package com.forever.base.datasource;

/**
 * 通过ThreadLocal动态切换数据源
 */
public final class DataSourceContextHolder {
	private static final ThreadLocal<String> holder = new ThreadLocal<String>();

	public static void setCustomerType(String customerType) {
		holder.set(customerType);
	}

	public static String getCustomerType() {
		return holder.get();
	}

	public static void clearCustomerType() {
		holder.remove();
	}
}